﻿using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using TianlalaHSB.Models;

namespace TianlalaHSB.ViewModels;

public class SenderViewModel
{
    public SenderViewModel()
    {
        SendMessageCommand = new RelayCommand(SendMessage);
    }

    public IRelayCommand SendMessageCommand { get; }

    public void SendMessage()
    {
        WeakReferenceMessenger.Default.Send(new Message("Hello from SenderViewModel!"));
    }
}